# configure.ac
# 
# --
# Copyright (c) 2012, Christophe Huriaux
# Distributed under the terms of the MIT license.
# http://www.opensource.org/licenses/mit-license.php
# -- 



AC_PREREQ([2.68])
AC_INIT([mcsoup], [0.1-beta], [c.huriaux@gmail.com])

AC_CONFIG_SRCDIR([src/mcSoup.cpp])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([aclocal])

MCSOUP_CHECK_PACKET

AM_INIT_AUTOMAKE([1.10 foreign -Wall])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_RANLIB
AX_PROG_DOXYGEN

# Checks for libraries.
AC_CHECK_LIB([pthread], [pthread_create])
AC_CHECK_LIB([SDL], [SDL_Init])
AC_CHECK_LIB([SDL_image], [IMG_Load])
AC_CHECK_LIB([GL], [glBegin])
AC_CHECK_LIB([GLU], [gluPerspective])

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h malloc.h netdb.h netinet/in.h stdint.h sys/socket.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_CHECK_FUNCS([gethostbyname inet_ntoa memset socket sqrt strerror])

# C++0x config
CXXFLAGS='-Wall -std=c++0x -g'

AX_CONFIG_DOXYGEN([doc/doxygen.cfg])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([Makefile])

AC_OUTPUT
